module.exports = {
	deviceParam(nodeArrayData, linkArrayData,queryId) {
		//自定义头
		let strhead = '';
		if(queryId=='0'){
			strhead =
				`clock {\r\n\tstarttime '2014-01-01 0:00:00';\r\n\tstoptime '2014-01-01 0:00:30';\r\n\ttimezone EST+5EDT;\r\n}\r\n\r\n#set profiler=1\r\n#set iteration_limit=100000;\r\n#set relax_naming_rules=1;\r\n\r\nmodule powerflow {\r\n\tsolver_method NR;\r\n};\r\nmodule tape;\r\nmodule generators;\r\nmodule climate;\r\nmodule residential;\r\n`;
		}else if(queryId=='1'||queryId=='2'){
			strhead =
				`clock {\r\n     starttime '2009-01-01 00:00:00';\r\n     stoptime '2009-01-02 00:00:00';\r\n//     timezone PST+8PDT;\r\n}\r\n\r\nmodule powerflow;\r\nmodule tape;\r\nmodule generators;\r\n`;
		}
		//电动汽车
		let strcar = '';
		for (let i = 0; i < nodeArrayData.length; i++) {
			if (nodeArrayData[i].icon == 'vehicle') {
				switch (nodeArrayData[i].modelParameter[0].value) {
					case "高":
						nodeArrayData[i].modelParameter[0].value = 'HIGH';
						break;
					case "中":
						nodeArrayData[i].modelParameter[0].value = 'MEDIUM';
						break;
					case "低":
						nodeArrayData[i].modelParameter[0].value = 'LOW';
						break;
					default:
				}
				switch (nodeArrayData[i].modelParameter[1].value) {
					case "是":
						nodeArrayData[i].modelParameter[1].value = 'TRUE';
						break;
					case "否":
						nodeArrayData[i].modelParameter[1].value = 'FALSE';
						break;
					default:
				}
				strcar += 'object house {\r\nparent _' +
					nodeArrayData[i].modelParameter[4].value + ';\r\nname house' +
					i + ';\r\nobject evcharger {\r\n\tname _' +
					nodeArrayData[i].key + ';\r\n\tcharger_type ' +
					nodeArrayData[i].modelParameter[0].value + ';\r\n\tcharge_at_work ' +
					nodeArrayData[i].modelParameter[1].value + ';\r\n\tcharger_efficiency ' +
					nodeArrayData[i].modelParameter[2].value + ';\r\n\tcapacity ' +
					nodeArrayData[i].modelParameter[3].value +
					';\r\n};\r\n}\r\nobject recorder {\r\n\t name evcharger_recorder;\r\n\t parent _' +
					nodeArrayData[i].key +
					';\r\n\t file evcharger.csv;\r\n\t interval 60;\r\n\t property power.real, power.imag; \r\n};\r\n\r\n'
			}
		}
		//储能
		let strbattery = '';
		for (let i = 0; i < nodeArrayData.length; i++) {
			if (nodeArrayData[i].icon == 'storage') {
				switch (nodeArrayData[i].modelParameter[0].value) {
					case "电压控制":
						nodeArrayData[i].modelParameter[0].value = 'VOLTAGE_CONTROLLED';
						break;
					case "功率驱动":
						nodeArrayData[i].modelParameter[0].value = 'POWER_DRIVEN';
						break;
					case "供应驱动":
						nodeArrayData[i].modelParameter[0].value = 'SUPPLY_DRIVEN';
						break;
					case "恒定功率因数":
						nodeArrayData[i].modelParameter[0].value = 'CONSTANT_PF';
						break;
					case "恒定功率":
						nodeArrayData[i].modelParameter[0].value = 'CONSTANT_PQ';
						break;
					case "恒定电压":
						nodeArrayData[i].modelParameter[0].value = 'CONSTANT_V=1';
						break;
					default:
				}
				switch (nodeArrayData[i].modelParameter[1].value) {
					case "并网":
						nodeArrayData[i].modelParameter[1].value = 'ONLINE';
						break;
					case "脱网":
						nodeArrayData[i].modelParameter[1].value = 'OFFLINE';
						break;
					default:
				}
				strbattery += 'object meter {\r\nname tm_B_' + i + ';\r\nparent _' +
					nodeArrayData[i].modelParameter[10].value + ';\r\nphases "' +
					nodeArrayData[i].modelParameter[11].value + '";\r\nnominal_voltage ' +
					nodeArrayData[i].modelParameter[12].value + ';\r\nobject battery{\r\n\tname _' +
					nodeArrayData[i].key + ';\r\n\tgenerator_mode ' +
					nodeArrayData[i].modelParameter[0].value + ';\r\n\tgenerator_status ' +
					nodeArrayData[i].modelParameter[1].value + ';\r\n\tpower_factor ' +
					nodeArrayData[i].modelParameter[2].value + ';\r\n\tparasitic_power_draw ' +
					nodeArrayData[i].modelParameter[3].value + ';\r\n\tbase_efficiency ' +
					nodeArrayData[i].modelParameter[4].value + ';\r\n\tV_Max ' +
					nodeArrayData[i].modelParameter[5].value + ';\r\n\tI_Max ' +
					nodeArrayData[i].modelParameter[6].value + ';\r\n\tP_Max ' +
					nodeArrayData[i].modelParameter[7].value + ';\r\n\tE_Max ' +
					nodeArrayData[i].modelParameter[8].value + ';\r\n\tpower_type DC;\r\n\tEnergy ' +
					nodeArrayData[i].modelParameter[9].value +
					';\r\n};\r\n}\r\n'
			}
		}
		//负荷/轨道交通/充电站
		let strload = '';
		let loadVlaue = '';
		for (let i = 0; i < nodeArrayData.length; i++) {
			if (nodeArrayData[i].icon == 'load') {
				let modelParameter = nodeArrayData[i].modelParameter;
				for (let j = 0; j < modelParameter.length; j++) {
					if (j == 2 || j == 3 || j == 4) {
						if (modelParameter[j].value) {
							let power = '';let player = '';
							if (j == 2) {
								player = ';\r\n\tobject player {\r\n\t\tproperty constant_power_A;\r\n\t\tfile 2a.player; \r\n\t};'
								power = '\r\n\tconstant_power_A '
							} else if (j == 3) {
								player = ';\r\n\tobject player {\r\n\t\tproperty constant_power_B;\r\n\t\tfile 2b.player; \r\n\t};'
								power = '\r\n\tconstant_power_B '
							} else if (j == 4) {
								player = ';\r\n\tobject player {\r\n\t\tproperty constant_power_C;\r\n\t\tfile 2c.player; \r\n\t};'
								power = '\r\n\tconstant_power_C '
							}
							loadVlaue += power + modelParameter[j].value + player 
						}
					}
				}
				strload += 'object load {\r\n\tphases \"' +
					nodeArrayData[i].modelParameter[0].value + '\";\r\n\tname _' +
					nodeArrayData[i].key + ';\r\n\tparent _' +
					nodeArrayData[i].modelParameter[1].value + ';\r\n\tnominal_voltage ' +
					nodeArrayData[i].modelParameter[5].value + ';'+
					loadVlaue +  '\r\n}\r\n'
			}
			loadVlaue = '';
		}
		
		//轨道交通
		let strGuidao = '';
		for (let i = 0; i < nodeArrayData.length; i++) {
			if (nodeArrayData[i].icon == 'guidao') {
				let modelParameter = nodeArrayData[i].modelParameter;
				let player = '\r\n\tobject player {\r\n\t\tproperty constant_power_A;\r\n\t\tfile 2a.player; \r\n\t};\r\n\tobject player {\r\n\t\tproperty constant_power_B;\r\n\t\tfile 2b.player; \r\n\t};\r\n\tobject player {\r\n\t\tproperty constant_power_C;\r\n\t\tfile 2c.player; \r\n\t};'
				strload += 'object load {\r\n\tphases \"' +
					nodeArrayData[i].modelParameter[0].value + '\";\r\n\tname _' +
					nodeArrayData[i].key + ';\r\n\tparent _' +
					nodeArrayData[i].modelParameter[1].value + ';\r\n\tnominal_voltage ' +
					nodeArrayData[i].modelParameter[5].value + ';'+
					player +  '\r\n}\r\n'
			}
			loadVlaue = '';
		}

		//母线
		let strnode = '';
		let nodeVlaue = '';
		for (let i = 0; i < nodeArrayData.length; i++) {
			if (nodeArrayData[i].icon == 'node') {
				switch (nodeArrayData[i].modelParameter[0].value) {
					case "平衡节点":
						nodeArrayData[i].modelParameter[0].value = 'SWING';
						break;
					case "PV节点":
						nodeArrayData[i].modelParameter[0].value = 'PV';
						break;
					case "PQ节点":
						nodeArrayData[i].modelParameter[0].value = 'PQ';
						break;
					default:
				}
				let modelParameter = nodeArrayData[i].modelParameter
				for (let j = 0; j < modelParameter.length; j++) {
					if (j == 2 || j == 3 || j == 4) {
						if (modelParameter[j].value) {
							let power = '';
							if (j == 2) {
								power = ';\r\n\tvoltage_A '
							} else if (j == 3) {
								power = ';\r\n\tvoltage_B '
							} else if (j == 4) {
								power = ';\r\n\tvoltage_C '
							}
							nodeVlaue += power + modelParameter[j].value
						}
					}
				}
				if(nodeArrayData[i].modelParameter[0].value==''){
					strnode += 'object node {\r\n\tphases \"' +
						nodeArrayData[i].modelParameter[1].value+ '\";\r\n\tname _' +
						nodeArrayData[i].key +nodeVlaue+ ';\r\n\tnominal_voltage ' +
						nodeArrayData[i].modelParameter[5].value + ';\r\n}\r\n'
				}else{
					strnode += 'object node {\r\n\tphases \"' +
						nodeArrayData[i].modelParameter[1].value+ '\";\r\n\tbustype ' +
						nodeArrayData[i].modelParameter[0].value + ';\r\n\tname _' +
						nodeArrayData[i].key +nodeVlaue+ ';\r\n\tnominal_voltage ' +
						nodeArrayData[i].modelParameter[5].value + ';\r\n}\r\n'
				}
			}
			nodeVlaue = '';
		}
		//并联电容器
		let strcapacitor = '';
		for (let i = 0; i < nodeArrayData.length; i++) {
			if (nodeArrayData[i].icon == 'capacitor') {
				strcapacitor += 'object load {\r\n\tphases \"' +
					nodeArrayData[i].modelParameter[0].value + '\";\r\n\tname _' +
					nodeArrayData[i].modelParameter[6].value + ';\r\n\tparent _' +
					nodeArrayData[i].modelParameter[1].value + ';\r\n\tconstant_impedance_A ' +
					nodeArrayData[i].modelParameter[2].value + ';\r\n\tconstant_impedance_B ' +
					nodeArrayData[i].modelParameter[3].value + ';\r\n\tconstant_impedance_C ' +
					nodeArrayData[i].modelParameter[4].value + ';\r\n\tnominal_voltage ' +
					nodeArrayData[i].modelParameter[5].value + ';\r\n}'
			}
		}
		//光伏
		let strsolar = '';
		for (let i = 0; i < nodeArrayData.length; i++) {
			if (nodeArrayData[i].icon == 'photovoltaic') {
				switch (nodeArrayData[i].modelParameter[0].value) {
					case "供应驱动":
						nodeArrayData[i].modelParameter[0].value = 'SUPPLY_DRIVEN';
						break;
					case "恒定功率因数":
						nodeArrayData[i].modelParameter[0].value = 'CONSTANT_PF';
						break;
					case "恒定功率":
						nodeArrayData[i].modelParameter[0].value = 'CONSTANT_PQ';
						break;
					case "恒定电压":
						nodeArrayData[i].modelParameter[0].value = 'CONSTANT_V';
						break;
					default:
				}
				switch (nodeArrayData[i].modelParameter[1].value) {
					case "并网":
						nodeArrayData[i].modelParameter[1].value = 'ONLINE';
						break;
					case "脱网":
						nodeArrayData[i].modelParameter[1].value = 'OFFLINE';
						break;
					default:
				}
				switch (nodeArrayData[i].modelParameter[2].value) {
					case "聚光板":
						nodeArrayData[i].modelParameter[2].value = 'CONCENTRATOR';
						break;
					case "GA-AS薄膜":
						nodeArrayData[i].modelParameter[2].value = 'THIN_FILM_GA_AS';
						break;
					case "非晶体硅":
						nodeArrayData[i].modelParameter[2].value = 'AMORPHOUS_SILICON';
						break;
					case "多晶体硅":
						nodeArrayData[i].modelParameter[2].value = 'MULTI_CRYSTAL_SILICON';
						break;
					case "单晶体硅":
						nodeArrayData[i].modelParameter[2].value = 'SINGLE_CRYSTAL_SILICON';
						break;
					default:
				}
				strsolar += 'object meter {\r\n\tname tm_B_' + i + ';\r\n\tparent _' +
					nodeArrayData[i].modelParameter[5].value + ';\r\n\tphases "' +
					nodeArrayData[i].modelParameter[6].value + '";\r\n\tnominal_voltage ' +
					nodeArrayData[i].modelParameter[7].value + ';\r\n\tobject inverter {\r\n\tname inv_B_' +
					i + ';\r\n\tphases "' +
					nodeArrayData[i].modelParameter[6].value +
					'";\r\n\tgenerator_mode CONSTANT_PF;\r\n\tgenerator_status ONLINE;\r\n\tinverter_type PWM;\r\n\tpower_factor 1.0;\r\n\tinverter_efficiency 1;\r\nobject solar{\r\n\tname _' +
					nodeArrayData[i].key + ';\r\n\tgenerator_mode ' +
					nodeArrayData[i].modelParameter[0].value + ';\r\n\tgenerator_status ' +
					nodeArrayData[i].modelParameter[1].value + ';\r\n\tpanel_type ' +
					nodeArrayData[i].modelParameter[2].value + ';\r\n\tefficiency ' +
					nodeArrayData[i].modelParameter[3].value + ';\r\n\tarea ' +
					nodeArrayData[i].modelParameter[4].value + ';\r\n};\r\n};\r\n}\r\n'
			}
		}
		//同步发电机
		let strgenerator = '';
		for (let i = 0; i < nodeArrayData.length; i++) {
			if (nodeArrayData[i].icon == 'generator') {
				switch (nodeArrayData[i].modelParameter[0].value) {
					case "恒定有功功率":
						nodeArrayData[i].modelParameter[0].value = 'CONSTANTP';
						break;
					case "恒定功率":
						nodeArrayData[i].modelParameter[0].value = 'CONSTANTPQ';
						break;
					case "恒定能量":
						nodeArrayData[i].modelParameter[0].value = 'CONSTANTE';
						break;
					default:
				}
				switch (nodeArrayData[i].modelParameter[1].value) {
					case "并网":
						nodeArrayData[i].modelParameter[1].value = 'ONLINE';
						break;
					case "脱网":
						nodeArrayData[i].modelParameter[1].value = 'OFFLINE';
						break;
					default:
				}
				switch (nodeArrayData[i].modelParameter[2].value) {
					case "星型同步":
						nodeArrayData[i].modelParameter[2].value = 'DYN_SYNCHRONOUS';
						break;
					case "同步":
						nodeArrayData[i].modelParameter[2].value = 'SYNCHRONOUS';
						break;
					case "异步":
						nodeArrayData[i].modelParameter[2].value = 'INDUCTION';
						break;
					default:
				}

				strgenerator += 'object meter {\r\n\tname meter_diesel_' +
					i + ';\r\n\tparent _' +
					nodeArrayData[i].modelParameter[8].value + ';\r\n\tphases "' +
					nodeArrayData[i].modelParameter[9].value + '";\r\n\tnominal_voltage ' +
					nodeArrayData[i].modelParameter[10].value + ';\r\n\t  object diesel_dg {\r\n\t\tname _' +
					nodeArrayData[i].modelParameter[11].value + ';\r\n\t\tGen_mode ' +
					nodeArrayData[i].modelParameter[0].value + ';\r\n\t\tGen_status ' +
					nodeArrayData[i].modelParameter[1].value + ';\r\n\t\tGen_type ' +
					nodeArrayData[i].modelParameter[2].value + ';\r\n\t\tpf ' +
					nodeArrayData[i].modelParameter[3].value + ';\r\n\t\tRated_VA ' +
					nodeArrayData[i].modelParameter[4].value + ';\r\n\t\tRated_V ' +
					nodeArrayData[i].modelParameter[5].value + ';\r\n\t\tspeed ' +
					nodeArrayData[i].modelParameter[6].value + ';\r\n\t\ttorque ' +
					nodeArrayData[i].modelParameter[7].value +
					';\r\n};\r\n}\r\n'
			}
		}
		// 变压器
		let definedstrans = '';
		let strtransformer = '';
		for (let i = 0; i < nodeArrayData.length; i++) {
			if (nodeArrayData[i].icon == 'transformer') {
				switch (nodeArrayData[i].modelParameter[1].value) {
					case "三角形-星型连接":
						nodeArrayData[i].modelParameter[1].value = 'DELTA_GWY';
						break;
					case "三角形-三角形连接":
						nodeArrayData[i].modelParameter[1].value = 'DELTA_DELTA';
						break;
					case "星型-星型连接":
						nodeArrayData[i].modelParameter[1].value = ' WYE_WYE';
						break;
					case "未知":
						nodeArrayData[i].modelParameter[1].value = 'UNKNOWN';
						break;
					default:
				}
				switch (nodeArrayData[i].modelParameter[2].value) {
					case "拱顶式":
						nodeArrayData[i].modelParameter[2].value = 'VAULT';
						break;
					case "落地式":
						nodeArrayData[i].modelParameter[2].value = 'PADMOUNT';
						break;
					case "杆顶式":
						nodeArrayData[i].modelParameter[2].value = 'POLETOP';
						break;
					case "未知":
						nodeArrayData[i].modelParameter[2].value = 'UNKNOWN';
						break;
					default:
				}
				definedstrans += 'object transformer_configuration: {\r\n\tname transformer_configuration' +
					i + ';\r\n\tconnect_type ' +
					nodeArrayData[i].modelParameter[1].value + ';\r\n\tinstall_type ' +
					nodeArrayData[i].modelParameter[2].value + ';\r\n\tpower_rating ' +
					nodeArrayData[i].modelParameter[3].value + ';\r\n\tprimary_voltage ' +
					nodeArrayData[i].modelParameter[4].value + ';\r\n\tsecondary_voltage ' +
					nodeArrayData[i].modelParameter[5].value + ';\r\n\tresistance ' +
					nodeArrayData[i].modelParameter[6].value + ';\r\n\treactance ' +
					nodeArrayData[i].modelParameter[7].value + ';\r\n}\r\n';
				strtransformer += 'object transformer {\r\n\tphases \"' +
					nodeArrayData[i].modelParameter[0].value + '\";\r\n\tname _' +
					nodeArrayData[i].modelParameter[10].value + ';\r\n\tfrom _' +
					nodeArrayData[i].modelParameter[8].value + ';\r\n\tto _' +
					nodeArrayData[i].modelParameter[9].value + ';\r\n\tconfiguration transformer_configuration' + i + ';\r\n}\r\n'
			}
		}
		//风电
		let strwindPower = '';
		for (let i = 0; i < nodeArrayData.length; i++) {
			if (nodeArrayData[i].icon == 'windPower') {
				switch (nodeArrayData[i].modelParameter[0].value) {
					case "并网":
						nodeArrayData[i].modelParameter[0].value = 'ONLINE';
						break;
					case "脱网":
						nodeArrayData[i].modelParameter[0].value = 'OFFLINE';
						break;
					default:
				}
				switch (nodeArrayData[i].modelParameter[1].value) {
					case "同步":
						nodeArrayData[i].modelParameter[1].value = 'SYNCHRONOUS';
						break;
					case "异步":
						nodeArrayData[i].modelParameter[1].value = 'INDUCTION';
						break;
					default:
				}
				switch (nodeArrayData[i].modelParameter[2].value) {
					case "恒定能量输出":
						nodeArrayData[i].modelParameter[2].value = 'CONSTANTE';
						break;
					case "恒定有功输出":
						nodeArrayData[i].modelParameter[2].value = 'CONSTANTP';
						break;
					default:
				}
				switch (nodeArrayData[i].modelParameter[3].value) {
					case "美国伯吉公司10kW风机":
						nodeArrayData[i].modelParameter[3].value = 'BERGEY_10kW';
						break;
					case "美国通用电气25MW风机":
						nodeArrayData[i].modelParameter[3].value = 'GE_25MW';
						break;
					case "丹麦维斯塔斯1.6MW风机":
						nodeArrayData[i].modelParameter[3].value = 'VESTAS_V82';
						break;
					default:
				}
				strwindPower += 'object meter {\r\nname meter_wind' + i + ';\r\nparent _' +
					nodeArrayData[i].modelParameter[4].value + ';\r\nphases "' +
					nodeArrayData[i].modelParameter[5].value + '";\r\nnominal_voltage ' +
					nodeArrayData[i].modelParameter[6].value + ';\r\nobject windturb_dg {\r\n\tname _' +
					nodeArrayData[i].key + ';\r\n\tphases "' +
					nodeArrayData[i].modelParameter[5].value + '";\r\n\tGen_status ' +
					nodeArrayData[i].modelParameter[0].value + ';\r\n\tGen_type ' +
					nodeArrayData[i].modelParameter[1].value + ';\r\n\tGen_mode ' +
					nodeArrayData[i].modelParameter[2].value + ';\r\n\tTurbine_Model ' +
					nodeArrayData[i].modelParameter[3].value +
					';\r\n  };\r\n}\r\nobject recorder {\r\n\t name windturb_dg_recorder;\r\n\t parent _' +
					nodeArrayData[i].key +
					';\r\n\tfile windturb_dg.csv;\r\n\t interval 60;\r\n\t property power_A.real, power_A.imag,power_B.real,power_B.imag,power_C.real,power_C.imag; \r\n};\r\n\r\n'
			}
		}
		//断路器
		let strswitch = '';
		let nodeSwitch = '';
		for (let i = 0; i < nodeArrayData.length; i++) {
			if (nodeArrayData[i].icon == 'duanlu') {
				switch (nodeArrayData[i].modelParameter[1].value) {
					case "打开":
						nodeArrayData[i].modelParameter[1].value = 'OPEN';
						break;
					case "关闭":
						nodeArrayData[i].modelParameter[1].value = 'CLOSED';
						break;
					default:
				}
				strswitch += 'object switch {\r\nname switch' + i + ';\r\nfrom _' +
					nodeArrayData[i].modelParameter[2].value + ';\r\tto _' +
					nodeArrayData[i].modelParameter[3].value + ';\r\nphases "' +
					nodeArrayData[i].modelParameter[0].value + '";\r\nstatus ' +
					nodeArrayData[i].modelParameter[1].value + ';\r\n};\r\n\r\n';
					
				nodeSwitch += 'object node {\r\n\tphases \"ABC\";\r\n\tname _' +
					nodeArrayData[i].modelParameter[2].value + 
					';\r\n\tnominal_voltage 5773.5027;\r\n}\r\n'+'object node {\r\n\tphases \"ABC\";\r\n\tname _' +
					nodeArrayData[i].modelParameter[3].value + ';\r\n\tnominal_voltage 5773.5027;\r\n}\r\n'
					
			}
		}
		//线路
		let strline = '';
		let defineline = '';
		let toValue = [];
		let keyIndex = []
		for (let i = 0; i < linkArrayData.length; i++) {
				toValue.push(linkArrayData[i].modelParameter[13].value)
				for(let j = 0; j < nodeArrayData.length; j++){
					if(toValue[i]==nodeArrayData[j].key){
						if(nodeArrayData[j].icon=='node'){
							defineline += 'object line_configuration:' + i + ' {\r\n\tz11 ' +
								linkArrayData[i].modelParameter[3].value + ';\r\n\tz12 ' +
								linkArrayData[i].modelParameter[4].value + ';\r\n\tz13 ' +
								linkArrayData[i].modelParameter[5].value + ';\r\n\tz21 ' +
								linkArrayData[i].modelParameter[6].value + ';\r\n\tz22 ' +
								linkArrayData[i].modelParameter[7].value + ';\r\n\tz23 ' +
								linkArrayData[i].modelParameter[8].value + ';\r\n\tz31 ' +
								linkArrayData[i].modelParameter[9].value + ';\r\n\tz32 ' +
								linkArrayData[i].modelParameter[10].value + ';\r\n\tz33 ' +
								linkArrayData[i].modelParameter[11].value + ';\r\n}\r\n';
							strline += 'object overhead_line {\r\n\tphases \"' +
								linkArrayData[i].modelParameter[1].value + '\";\r\n\tname _' +
								linkArrayData[i].modelParameter[14].value + i + ';\r\n\tfrom _' +
								linkArrayData[i].modelParameter[12].value + ';\r\n\tto _' +
								linkArrayData[i].modelParameter[13].value + ';\r\n\tlength ' +
								linkArrayData[i].modelParameter[2].value + ';\r\n\tconfiguration line_configuration:' +
								i + ';\r\n}\r\n'
						}
					}
				}
		}
		//自定义尾
		let strfoot =
			`object group_recorder {\r\n    name recorder_1;\r\n    group "class=overhead_line"; \r\n    file current_in_A.csv; \r\n    interval 3600; \r\n    limit 50; \r\n    property current_in_A; \r\n}\r\n\r\nobject group_recorder {\r\n    name recorder_2;\r\n    group "class=overhead_line";\r\n    file current_in_B.csv;\r\n    interval 3600;limit 500;\r\n    property current_in_B;\r\n}\r\n\r\nobject group_recorder {\r\n    name recorder_3;\r\n    group "class=overhead_line";\r\n    file current_in_C.csv;\r\n    interval 3600;limit 500;\r\n    property current_in_C;\r\n}\r\nobject group_recorder {\r\n    name rec_v_1;\r\n    group "class=node";\r\n    file voltage_A.csv;\r\n    interval 3600;limit 500;\r\n    property voltage_A;\r\n}\r\nobject group_recorder {\r\n    name rec_v_2;\r\n    group "class=node";\r\n    file voltage_B.csv;\r\n    interval 3600;limit 500;\r\n    property voltage_B;\r\n}\r\nobject group_recorder {\r\n    name rec_v_3;\r\n    group "class=node";\r\n    file voltage_C.csv;\r\n    interval 3600;limit 500;\r\n    property voltage_C;\r\n}\r\n   object currdump {\r\nfilename Current_Dump5.csv; \r\n}\r\n   object voltdump {\r\nfilename Volt_Dump5.csv; \r\n}`
		//字符串拼接
		let strs = strhead + strcar + strbattery + strload + strnode + nodeSwitch + strcapacitor + strsolar + strgenerator +
			definedstrans + strwindPower + defineline + strswitch + strline + strtransformer + strfoot;
			console.log(strs)
		return strs
	}
}
